package vip.liux.contracts.repositories.pay;

import org.springframework.data.repository.ListCrudRepository;
import org.springframework.data.repository.ListPagingAndSortingRepository;
import org.springframework.data.repository.NoRepositoryBean;
import vip.liux.contracts.models.pay.PayDemoWithdraw;
import vip.liux.contracts.shared.enums.pay.PayDemoWithdrawStatus;

import java.time.LocalDateTime;

@NoRepositoryBean
public interface PayDemoWithdrawRepository extends ListPagingAndSortingRepository<PayDemoWithdraw, Long>, ListCrudRepository<PayDemoWithdraw, Long> {

    void updateByIdAndStatus(Long id, PayDemoWithdrawStatus whereStatus, String payTransferNo);

    void updateByIdAndStatus(Long id, PayDemoWithdrawStatus whereStatus, PayDemoWithdrawStatus status, LocalDateTime transferTime, String transferErrorMsg);

    int updateByIdAndStatus(Long id, PayDemoWithdrawStatus whereStatus, PayDemoWithdrawStatus status, String transferErrorMsg);
}